package com.kele.model.entity;

import com.kele.base.annotation.Unique;
import com.kele.base.entity.BaseEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;

import java.io.Serializable;

@Entity
@Table(name = "student")
public class Student extends BaseEntity<Long> implements Serializable  {

    /**
     * 学号
     */
    @Unique(message = "studentNo is already exists")
    @Column(name = "student_no", nullable = false)
    private String studentNo;
    /**
     * 姓名
     */
    @Column(nullable = false)
    private String name;
    /**
     * 年龄
     */
    private Integer age;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getStudentNo() {
        return studentNo;
    }

    public void setStudentNo(String studentNo) {
        this.studentNo = studentNo;
    }
}
